//
//  UIButton+ButtonYMJ.m
//  拉勾7.17
//
//  Created by dllo on 16/7/17.
//  Copyright © 2016年 YMJ. All rights reserved.
//

#import "UIButton+ButtonYMJ.h"

@implementation UIButton (ButtonYMJ)
+ (UIButton *)createClickHereButton {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(0, 0, 80, 50);
    button.center = CGPointMake(238, HEIGHT / 2 + 53);
    [button setTitle:@"点击这里" forState:0];
    [button setTitleColor:COLOR1 forState:0];
    button.backgroundColor = [UIColor clearColor];
    button.titleLabel.font = [UIFont italicSystemFontOfSize:19];
    return button;
}
+ (UIButton *)createNextStepButton {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(0, 0, WIDTH - 40, 53);
    button.center = CGPointMake(WIDTH / 2, HEIGHT / 2);
    [button setTitle:@"下一步" forState:0];
    button.backgroundColor = COLOR1;
    button.titleLabel.font = [UIFont italicSystemFontOfSize:20];
    [button setTitleColor:[UIColor whiteColor] forState:0];
    return button;
}
+ (UIButton *)createBackButton {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(40, 5, 40, 50);
    [button setTitle:@"返回" forState:0];
    [button setTitleColor:COLOR1 forState:0];
    button.titleLabel.font = [UIFont italicSystemFontOfSize:20];
    return button;
}
+ (UIButton *)createForgotPassword {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(WIDTH - 20 - 80, 450, 80, 50);
    button.backgroundColor = [UIColor clearColor];
    [button setTitle:@"忘记密码" forState:0];
    [button setTitleColor:[UIColor whiteColor] forState:0];
    button.titleLabel.font = [UIFont italicSystemFontOfSize:19];
    
    return button;
}
+ (UIButton *)createLoginButton {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(0, 0, WIDTH - 40, 53);
    button.center = CGPointMake(WIDTH / 2, 520 + 20);
    button.backgroundColor = COLOR1;
    [button setTitle:@"登录" forState:0];
    button.titleLabel.font = [UIFont italicSystemFontOfSize:20];
    [button setTitleColor:[UIColor whiteColor] forState:0];
    return button;
}
+ (UIButton *)createRegisterButton {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(0, 0, WIDTH - 40, 53);
    button.center = CGPointMake(WIDTH / 2, 520 + 53 + 10 + 20);
    
    [button setTitle:@"注册拉勾" forState:0];
    button.titleLabel.font = [UIFont italicSystemFontOfSize:20];
    [button setTitleColor:[UIColor whiteColor] forState:0];
    //加边框,宽度小于0.85有的地方没有显示出来
    button.layer.borderWidth = 0.85;
    button.layer.borderColor = COLOR1.CGColor;
    return button;
}
+ (UIButton *)createLookAroundButton {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(WIDTH - 120, 5, 150, 50);
    [button setTitle:@"随便逛逛" forState:0];
    button.backgroundColor = [UIColor clearColor];
    [button setImage:[UIImage imageNamed:@"icon_goahead"] forState:0];
    button.imageEdgeInsets = UIEdgeInsetsMake(0,0,0,0);
    [button setTitleColor:[UIColor lightGrayColor]forState:0];
    button.titleLabel.font = [UIFont italicSystemFontOfSize:19];
    // 设置
    button.imageEdgeInsets = UIEdgeInsetsMake(0, 60, 0, - 60);
    button.titleEdgeInsets = UIEdgeInsetsMake(0, - 30, 0, 30);
    return button;
}
@end
